#ifndef DBSTORAGE_CREATE_PACKAGE_STORAGE_CMD_HPP
#define DBSTORAGE_CREATE_PACKAGE_STORAGE_CMD_HPP

#include "DbStorage/DbStorageCmd.hpp"

namespace Model { class Package; }

namespace DbStorage
{

/// @ingroup DbStorage
/// @brief It implements the insertion of a new package to the database.
class DBSTORAGE_API CreatePackageStorageCmd: public DbStorageCmd
{
public:
	/// @brief It initializes the command.
	/// @param subject the package to be stored.
	/// @param dbConnection the database connection to be used for storage.
	CreatePackageStorageCmd( Model::Package& subject, CaseDB::Connection& dbConnection);

	/// @brief It inserts the package in the database.
	///
	/// The insertion generates a primary key which will be set to the stored package object as the stored identifier.
	virtual void execute();
};

} // namespace DbStorage

#endif // DBSTORAGE_CREATE_PACKAGE_STORAGE_CMD_HPP
